# coding:utf-8
from machine import UART
import time
uart = UART(1 ,9600 ,tx=17 ,rx=18)
text = 'E'
times=0
while True:
    rtext = 'none'
#     uart.write(text.encode('utf-8'))
#     uart.write(text)
    if uart.any():
        rtext = uart.read(1)
    print(rtext,'+',times)
    times = times + 1
    time.sleep(0.5)